-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipam_pool: Fix publicly_advertisable bug #40042
Conversation
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
% make testacc PKG=ec2 TESTS=TestAccIPAMPool_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccIPAMPool_' -timeout 360m
2024/11/07 13:47:29 Initializing Terraform AWS Provider...
=== RUN TestAccIPAMPool_basic
=== PAUSE TestAccIPAMPool_basic
=== RUN TestAccIPAMPool_disappears
=== PAUSE TestAccIPAMPool_disappears
=== RUN TestAccIPAMPool_ipv6Basic
=== PAUSE TestAccIPAMPool_ipv6Basic
=== RUN TestAccIPAMPool_ipv6PublicIPAmazon
=== PAUSE TestAccIPAMPool_ipv6PublicIPAmazon
=== RUN TestAccIPAMPool_ipv6Contiguous
=== PAUSE TestAccIPAMPool_ipv6Contiguous
=== RUN TestAccIPAMPool_cascade
=== PAUSE TestAccIPAMPool_cascade
=== RUN TestAccIPAMPool_tags
=== PAUSE TestAccIPAMPool_tags
=== RUN TestAccIPAMPool_ipv6PrivateScope
=== PAUSE TestAccIPAMPool_ipv6PrivateScope
=== CONT TestAccIPAMPool_basic
=== CONT TestAccIPAMPool_ipv6Contiguous
=== CONT TestAccIPAMPool_tags
=== CONT TestAccIPAMPool_cascade
=== CONT TestAccIPAMPool_ipv6Basic
=== CONT TestAccIPAMPool_disappears
=== CONT TestAccIPAMPool_ipv6PublicIPAmazon
=== CONT TestAccIPAMPool_ipv6PrivateScope
--- PASS: TestAccIPAMPool_disappears (51.36s)
--- PASS: TestAccIPAMPool_ipv6Contiguous (60.21s)
--- PASS: TestAccIPAMPool_ipv6Basic (60.59s)
--- PASS: TestAccIPAMPool_ipv6PublicIPAmazon (60.98s)
--- PASS: TestAccIPAMPool_tags (69.71s)
--- PASS: TestAccIPAMPool_ipv6PrivateScope (73.83s)
--- PASS: TestAccIPAMPool_basic (91.91s)
--- PASS: TestAccIPAMPool_cascade (95.06s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 100.309s
This functionality has been released in v5.75.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Description
At the moment,
public_advertisable
is being sent to AWS when it shouldn't in certain cases. The current logic isn't checking thepublic_ip_source
so where ipv6, public scope, andpublic_ip_source = "amazon"
, it will includepublic_advertisable
😱 :Before that, pre #39600, the logic was wrong in a different way. It would include
public_advertisable
where ipv6 and thepublic_ip_source
was not"amazon"
indicating BYOIP, by either not usingpublic_ip_source
or explicitly setting"byoip"
. This would erroneously include non-public scope.The fix is to check all three things before setting
publicly_advertisable
: ipv6, public scope, and source is not Amazon.Relations
Closes #39967
Relates #39600
References
Output from Acceptance Testing